<template>
    <div class="swiper-container">
      <span>你可能还喜欢</span>
      <div class="swiper-wrapper">
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
        <div class="swiper-slide">
          <img src="./images/hover-down.jpg" />
          <span class="swiper-heigh"></span>
          <h4 class="name">费迪南的遐想·60S长绒棉四件套</h4>
          <p class="price">¥188</p>
        </div>
      </div>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
      <div class="swiper-pagination"></div>
    </div>
</template>

<script>
import Swiper from "swiper";
import "swiper/css/swiper.min.css";
export default {
  name:"Carousel",
  mounted() {
    new Swiper(".swiper-container", {
      slidesPerView: 4,
      spaceBetween: 30,
      slidesPerGroup: 4,
      loop: true,
      loopFillGroupWithBlank: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  },
}
</script>

<style lang="less" scoped>
.swiper-container{
  border: 1px solid #ebebeb;
  span{
    width: 100%;
    display: block;
    background: #f5f5f5;
    height: 44px;
    line-height: 44px;
    font-size: 17px;
    padding-left: 20px;
  }
}
.swiper-slide{
  text-align: center;
  img{
    height: 210px;
    width: 210px;
  }
  h4{
    height: 20px;
    line-height: 20px;
    font-size: 13px;
  }
  span{
    background: white;
    height: 20px;
  }
  p{
    color: red;
    font-size: 13px;
    height: 13px;
    padding:5px 0;
  }
}
.swiper-button-next,.swiper-button-prev{
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: #d8cfbb;
  --swiper-navigation-size:19px;
  --swiper-theme-color:#e2d8bf;
}
// .swiper-pagination{
//   top:100px;
// }


</style>